//
//  ZJFindPswView.m
//  ZiJinLian
//
//  Created by lzy on 2017/3/16.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ZJFindPswView.h"

@implementation ZJFindPswView

-(id)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    if (self) {
        self.backgroundColor=RGB(246, 246, 246);
        [self creatUI];
        
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    [self layOut];
}
-(void)creatUI
{
    //
    _phoneLab=[MYUI createLableFrame:CGRectMake(10, 30, MainW-20, 98/2) backgroundColor:[UIColor whiteColor] text:MyString(@"手机号") textColor:[UIColor colorWithHexString:@"#333333"] font:FontAndStyle14 numberOfLines:0 adjustsFontSizeToFitWidth:YES insert:UIEdgeInsetsMake(0, 15, 0, 0)];
    _phoneLab.layer.cornerRadius=5;
    _phoneLab.layer.masksToBounds=YES;
    [self addSubview:self.phoneLab];
    
    //
    _phoneTF=[MYUI createTextFieldFrame:CGRectMake(0,0,0,0) backgroundColor:[UIColor whiteColor] placeholder:MyString(@"请输入手机号") clearsOnBeginEditing:NO];
    _phoneTF.keyboardType=UIKeyboardTypeNumberPad;
    [self addSubview:self.phoneTF];
    
    
    //
    _securitycodeTF=[MYUI createTextFieldFrame:CGRectMake(0,0, 0, 0) backgroundColor:[UIColor whiteColor] placeholder:MyString(@"请输入验证码") clearsOnBeginEditing:NO];
    _securitycodeTF.keyboardType=UIKeyboardTypeNumberPad;
    [self addSubview:self.securitycodeTF];
    
    
    //
     _getsecuritycodeBtn=[MYUI creatButtonFrame:CGRectMake(0, 0, 0, 0) backgroundColor:[UIColor whiteColor] setTitle:MyString(@"获取验证码") setTitleColor:button_Red_Color ];
    [self addSubview:self.getsecuritycodeBtn];

    //
    _nextBtn=[MYUI creatButtonFrame:CGRectMake(0,0,0,0) backgroundColor:button_gray_Color setTitle:MyString(@"下一步") setTitleColor:Btn_TxTGray_Color ];
    _nextBtn.layer.cornerRadius=5;
    _nextBtn.layer.masksToBounds=YES;
    _nextBtn.titleLabel.font=FontAndStyle15;
    [self addSubview:self.nextBtn];
 
}
-(void)layOut
{
    [self.phoneTF makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.phoneLab.top).offset(0);
        make.right.equalTo(self.phoneLab.right).offset(0);
        make.bottom.equalTo(self.phoneLab.bottom).offset(0);
        make.left.equalTo(self.phoneLab.left).offset(80);
    }];
    
    [self.securitycodeTF makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.phoneLab.bottom).offset(30);
        make.right.equalTo(self.getsecuritycodeBtn.left).offset(-10);
        make.left.equalTo(self).offset(10);
        make.height.equalTo(98/2);
    }];
    [self.getsecuritycodeBtn makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.phoneLab.bottom).offset(30);
        make.right.equalTo(self).offset(-10);
        make.height.equalTo(98/2);
        make.width.equalTo(268/2);
        
    }];
    
    [self.nextBtn makeConstraints:^(MASConstraintMaker *make) {
        //make.centerX.equalTo(self.view);
        make.left.equalTo(self.left).offset(10);
        make.right.equalTo(self.right).offset(-10);
        make.top.equalTo(self.securitycodeTF.bottom).offset(30);
        make.height.equalTo(98/2);
        
    }];


    
}
@end
